{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "# l1=[1,2,3,4].sort()\n",
    "# l2=[1,2,4,3].sort()\n",
    "# print(l1==l2)\n",
    "\n",
    "l1=[[5,2],[7,8],[3,4],[5,6]]\n",
    "l2=[[3,4],[5,2],[7,8],[5,6]]\n",
    "# print(l1==l2)\n",
    "\n",
    "def judge_2list_equal(l1:list,l2:list):#判断二维数组是否相同（第二个维度数组是否相同）\n",
    "    if len(l1)!=len(l2):return False\n",
    "    for i in range(len(l1)):\n",
    "        if l1[i] not in l2:return False\n",
    "    return True\n",
    "print(judge_2list_equal(l1,l2))\n",
    "\n",
    "# 但是\n",
    "[1,1,2]\n",
    "[2,2,1]\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
